<%@ page language="java" contentType="text/html; charset=GBK" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <jsp:include page="../basePath.jsp"></jsp:include>
    <title>主控平台</title>
	<style>
	*{margin:0; padding:0; font-size:12px}
	.flashTimeBg{background:#ECEBF1; height:25px; border-top:1px solid #fff; border-bottom:1px solid #fff; text-align:right; padding:3px 5px 0 0;}
	.sjcqLeft th{ height:68px; background:#EBEBEB; text-align:center;font-size:14px; border-bottom:1px solid #fff}
/*	.sjcqLeft th.sjcqTabTip{background:url(themes/comm/images/sjcqTabTip.gif) no-repeat right bottom}*/
	.sjcqLeft th img{ vertical-align:middle; margin:0 auto; display:block}
	.sjcqLeft td.sjcqTit{font-size:14px; background:#EBEBEB; padding:0 13px; font-weight:bold; text-align:center}
	.sjcqLeft td.sjcqBlankH{ font-size:1px; height:9px}
	.sjcqLeft td.sjcqBlankV{ background:#F1F1F1}
	.sjcqLeft td.sjcqBlankV img{vertical-align:middle}
	.dataState00,.dataState01,.dataState02,.dataState03{ padding:5px 0 0 5px; vertical-align:top; line-height:1.4; color:#333}
	.dataState00{ background:#E96843;line-height:1.6;}
	.dataState01{ background:#BEDEF3;line-height:1.6;}
	.dataState02{ background:#ECEBF1;line-height:1.6;}
	.dataState03{ background:#ECEBF1;line-height:1.6;}
	.sjhcBg{width:180px;color:#000; overflow:auto;background:#FDF7CA; padding:8px 5px 0 8px; line-height:1.4; }
	.imgMid{vertical-align:middle;width:18px;heigth:18px margin:0 0 3px}
	</style>
	<script language="javascript" src="page/monitor/main_monitor.js" charset="utf-8"></script>
  </head>

  <body class="scrolling" style="overflow:auto">
  	<input type="hidden" id="startLogID" value="${monitorConsole.startLogID }">
	<div class="sjcqBox">
	  <div class="flashTimeBg">
	  	<div style="float:left; padding:5px 10px;text-align:left">
	  	  ${monitorConsole.serverStatus }
	  	</div>
	  </div>
	  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    	<tr>
     	  <td style="vertical-align:top" width="95%">
       		<!--数据流程 begin-->
     		<table id="etlConTB" border="0" cellspacing="0" cellpadding="0" class="sjcqLeft">
	    	  <tr>
	       		<th width="47" class="sjcqTabTip">&nbsp;</th>
	            <th width="30%"><img src="themes/comm/images/dataCollect.gif"/>源数据抽取</th>
	            <th width="26"><img src="themes/comm/images/topArrow.gif" /></th>
	            <th width="30%"><img src="themes/comm/images/dataLoad.gif"/>源数据加载</th>
	            <th width="26"><img src="themes/comm/images/topArrow.gif" /></th>
	            <th width="30%"><img src="themes/comm/images/dataClear.gif"/>源数据清洗转换</th>
	            <th width="26"><img src="themes/comm/images/topArrow.gif" /></th>
	    	  </tr>
<c:forEach var="minf" items="${monitorConsole.monitorInfos}" >
          	  <tr>
            	<td height="77" class="sjcqTit"> ${minf.systemName } </td>
<!-- 元数据抽取 -->
            	<td class="dataState0${minf.extractItem.runStatus}">
	          		运行状态：
	<c:if test="${minf.extractItem.runStatus=='3' }">	           	  
	           	  <img src="themes/comm/images/stopState.gif" class="imgMid" title="未开始"/>
	</c:if>	    
	<c:if test="${minf.extractItem.runStatus=='2' }">	           	  
	           	  <img src="themes/comm/images/loadState.gif" class="imgMid" title="运行中"/>
	</c:if>
	<c:if test="${minf.extractItem.runStatus=='1' }">	           	  
	           	  <img src="themes/comm/images/successState.gif" class="imgMid" title="成功"/>
	</c:if>
	<c:if test="${minf.extractItem.runStatus=='0' }">	           	  
	           	  <img src="themes/comm/images/failedState.gif" class="imgMid" title="失败"/>
	</c:if>
				  <br>
	      			告警状况：<span style="color:#888"> ${minf.extractItem.alarmInfo }</span>
	      		  <br />
	      			详细日志：
	<c:if test="${minf.extractItem.runStatus != '3' }">
	      			<a href="javascript:void(0);" onclick="openLogs('${minf.systemCode }','1');">查看</a>
	</c:if>
            	</td>
            	<td class="sjcqBlankV"><img src="themes/comm/images/sjcqArrow${minf.extractItem.runStatus=='0' || minf.extractItem.runStatus=='1' ? 'Ok' : '' }.gif" /></td>
<!-- 元数据加载 -->
            	<td class="dataState0${minf.loadItem.runStatus}">
	          		运行状态：
	<c:if test="${minf.loadItem.runStatus=='3' }">	           	  
	           	  <img src="themes/comm/images/stopState.gif" class="imgMid" title="未开始"/>
	</c:if>	    
	<c:if test="${minf.loadItem.runStatus=='2' }">	           	  
	           	  <img src="themes/comm/images/loadState.gif" class="imgMid" title="运行中"/>
	</c:if>
	<c:if test="${minf.loadItem.runStatus=='1' }">	           	  
	           	  <img src="themes/comm/images/successState.gif" class="imgMid" title="成功"/>
	</c:if>
	<c:if test="${minf.loadItem.runStatus=='0' }">	           	  
	           	  <img src="themes/comm/images/failedState.gif" class="imgMid" title="失败"/>
	</c:if>
				  <br />
	      			告警状况：<span style="color:#888"> ${minf.loadItem.alarmInfo }</span>
	      		  <br />
	      			详细日志：
	<c:if test="${minf.loadItem.runStatus != '3' }">
	      			<a href="javascript:void(0);" onclick="openLogs('${minf.systemCode }','2');">查看</a>
	</c:if>
            	</td>
	            <td class="sjcqBlankV"><img src="themes/comm/images/sjcqArrow${minf.loadItem.runStatus=='0' || minf.loadItem.runStatus=='1' ? 'Ok' : '' }.gif" /></td>
<!-- 源数据清洗转换 -->
            	<td class="dataState0${minf.transformItem.runStatus}">
	          		运行状态：
	<c:if test="${minf.transformItem.runStatus=='3' }">	           	  
	           	  <img src="themes/comm/images/stopState.gif" class="imgMid" title="未开始"/>
	</c:if>	    
	<c:if test="${minf.transformItem.runStatus=='2' }">	           	  
	           	  <img src="themes/comm/images/loadState.gif" class="imgMid" title="运行中"/>
	</c:if>
	<c:if test="${minf.transformItem.runStatus=='1' }">	           	  
	           	  <img src="themes/comm/images/successState.gif" class="imgMid" title="成功"/>
	</c:if>
	<c:if test="${minf.transformItem.runStatus=='0' }">	           	  
	           	  <img src="themes/comm/images/failedState.gif" class="imgMid" title="失败"/>
	</c:if>
				  <br />
	      			告警状况：<span style="color:#888"> ${minf.transformItem.alarmInfo }</span>
	      		  <br />
	      			详细日志：
	<c:if test="${minf.transformItem.runStatus != '3' }">
	      			<a href="javascript:void(0);" onclick="openLogs('${minf.systemCode }','4');">查看</a>
	</c:if>
            	</td>
	            <td class="sjcqBlankV"><img src="themes/comm/images/sjcqArrow${minf.transformItem.runStatus=='0' || minf.transformItem.runStatus=='1' ? 'Ok' : '' }.gif" /></td>
          	  </tr>
          	  <tr>
            	<td colspan="7" class="sjcqBlankH">&nbsp;</td>
          	  </tr>
</c:forEach>
	        </table>
        	  <!--数据流程 end-->
          </td>
     	  <td style="vertical-align:top">
           	  <!--数据核查 begin-->
              <table border="0" cellspacing="0" cellpadding="0" class="sjcqLeft">
          		<tr>
              	  <th width="172"><img src="themes/comm/images/dataCheck.gif"/>元数据质量检查</th>
               	</tr>
              	<tr>
              	  <td  style="vertical-align:top">
             		<div id="checkConDiv" class="sjhcBg">
<c:if test="${monitorConsole.chekStatus != -1}">
             			运行状态：元数据检查${monitorConsole.chekStatus == 0 ? '运行中' : '结束'}<br />
             			告警状况：<span style="color:#888"> ${monitorConsole.checkInfo }</span><br />
             			详细日志：<a href="javascript:void(0);" onclick="openMCLogs();">查看</a>
</c:if>
                	</div>
              	  </td>
       			</tr>
			  </table>
              <!--数据核查 end-->
     	  </td>
		</tr>
	  </table> 
    </div>
  </body>
</html>
